package xgenerator.ui.swing.model;

import javax.swing.DefaultComboBoxModel;

import xgenerator.constants.SqlDataTypes;

public class SqlDataTypeComboBoxModel extends DefaultComboBoxModel implements SqlDataTypes {
	
	/**
	 * Serializable
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * constructor
	 */
	public SqlDataTypeComboBoxModel() {
		/*
		 * number
		 */
		this.addElement(BIT_TYPE);
		this.addElement(TINYINT_TYPE);
		this.addElement(SMALLINT_TYPE);
		this.addElement(INTEGER_TYPE);
		this.addElement(BIGINT_TYPE);
		this.addElement(FLOAT_TYPE);
		this.addElement(REAL_TYPE);
		this.addElement(DOUBLE_TYPE);
		this.addElement(NUMERIC_TYPE);
		this.addElement(DECIMAL_TYPE);
		
		/*
		 * string
		 */
		this.addElement(CHAR_TYPE);
		this.addElement(VARCHAR_TYPE);
		this.addElement(LONGVARCHAR_TYPE);
		
		/*
		 * date
		 */
		this.addElement(DATE_TYPE);
		this.addElement(TIME_TYPE);
		this.addElement(TIMESTAMP_TYPE);
		
		/*
		 * binary
		 */
		this.addElement(BINARY_TYPE);
		this.addElement(VARBINARY_TYPE);
		this.addElement(LONGVARBINARY_TYPE);

		/*
		 * lob
		 */
		this.addElement(NULL_TYPE);
		this.addElement(OTHER_TYPE);
		this.addElement(JAVA_OBJECT_TYPE);
		this.addElement(DISTINCT_TYPE);
		this.addElement(STRUCT_TYPE);
		this.addElement(ARRAY_TYPE);
		this.addElement(BLOB_TYPE);
		this.addElement(CLOB_TYPE);
		this.addElement(REF_TYPE);
		this.addElement(DATALINK_TYPE);
		
		//------------------------- JDBC 4.0 -----------------------------------
		this.addElement(BOOLEAN_TYPE);
		this.addElement(ROWID_TYPE);
		this.addElement(NCHAR_TYPE);
		this.addElement(NVARCHAR_TYPE);
		this.addElement(LONGNVARCHAR_TYPE);
		this.addElement(NCLOB_TYPE);
		this.addElement(SQLXML_TYPE);
	}
}
